<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0050)https://gevent-socketio.readthedocs.org/en/latest/ -->
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    
    

    <title>Gevent-socketio documentation — gevent-socketio 0.3.1 documentation</title>
<!-- RTD <head> -->
<script type="text/javascript" async="" src="./Gevent-socketio documentation — gevent-socketio 0.3.1 documentation_files/ga.js"></script><script type="text/javascript" src="./Gevent-socketio documentation — gevent-socketio 0.3.1 documentation_files/jquery.min.js"></script>
<script type="text/javascript" src="./Gevent-socketio documentation — gevent-socketio 0.3.1 documentation_files/underscore.js"></script>
<script type="text/javascript" src="./Gevent-socketio documentation — gevent-socketio 0.3.1 documentation_files/doctools.js"></script>

  <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">

<script type="text/javascript">
  // This is included here for Javascript that doesn't have access to the templates.
  var doc_version = "latest";
  var doc_slug = "gevent-socketio";
</script>

<script type="text/javascript" src="./Gevent-socketio documentation — gevent-socketio 0.3.1 documentation_files/rtd.js"></script>
<!-- end RTD <head> -->

    
    <link rel="stylesheet" href="./Gevent-socketio documentation — gevent-socketio 0.3.1 documentation_files/rtd.css" type="text/css">
    <link rel="stylesheet" href="./Gevent-socketio documentation — gevent-socketio 0.3.1 documentation_files/pygments.css" type="text/css">
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '',
        VERSION:     '0.3.1',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <link rel="top" title="gevent-socketio 0.3.1 documentation" href="https://gevent-socketio.readthedocs.org/en/latest/#"> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="https://gevent-socketio.readthedocs.org/en/latest/genindex.html" title="General Index" accesskey="I">index</a></li>
        <li class="right">
          <a href="https://gevent-socketio.readthedocs.org/en/latest/py-modindex.html" title="Python Module Index">modules</a> |</li>
        <li><a href="https://gevent-socketio.readthedocs.org/en/latest/#">gevent-socketio 0.3.1 documentation</a> »</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="gevent-socketio-documentation">
<h1>Gevent-socketio documentation<a class="headerlink" href="https://gevent-socketio.readthedocs.org/en/latest/#gevent-socketio-documentation" title="Permalink to this headline">¶</a></h1>
<div class="toctree-wrapper compound">
<ul class="simple">
</ul>
</div>
<div class="section" id="introduction">
<h2>Introduction<a class="headerlink" href="https://gevent-socketio.readthedocs.org/en/latest/#introduction" title="Permalink to this headline">¶</a></h2>
<p>Socket.IO is a WebSocket-like abstraction that enables real-time
communication between a browser and a server.  <tt class="docutils literal"><span class="pre">gevent-socketio</span></tt> is a
Python implementation of the protocol.</p>
<p>The reference server implementation of Socket.IO runs on Node.js and was
developed by LearnBoost.  There are now server implementations in a
variety of languages.</p>
<p>One aim of this project is to provide a single <tt class="docutils literal"><span class="pre">gevent</span></tt>-based
API that works across the different WSGI-based web frameworks out
there (Pyramid, Pylons, Flask, web2py, Django, etc...).  Only ~3 lines
of code are required to tie-in <tt class="docutils literal"><span class="pre">gevent-socketio</span></tt> in your framework.
Note: you need to use the <tt class="docutils literal"><span class="pre">gevent</span></tt> python WSGI server to use
<tt class="docutils literal"><span class="pre">gevent-socketio</span></tt>.</p>
<p><strong>Namespaces</strong>: since you mostly have <strong>one</strong> websocket/socket.io
endpoint per website, it is important to be able to namespace the
different real-time activities of the different pages or parts of
your site, just like you need routes to map URLs to different parts
of your code.  The Socket.IO 0.7+ namespaces are a welcome addition,
and if you don’t use Socket.IO, you’ll probably end-up writing your
own namespacing mechanism at some point.</p>
<p><strong>Named events</strong>: To distinguish the messages that are coming and
going, you most probably want to give them some name. Here again, not
using Socket.IO, you will find yourself implementing a way to tag your
packets with names representing different tasks or actions to
perform. With Socket.IO 0.6 or with normal WebSockets, you would
probably encode a JSON object with one of the keys that is reserved
for that (I used <tt class="docutils literal"><span class="pre">{"type":</span> <span class="pre">"submit_something"}</span></tt>.  Socket.IO 0.7+
implements named events, which put that information in a terse form on
the wire.  It also allows you to define callbacks, that can be
acknowledged by the other endpoint, and then fire back your function
with some return parameters.  Something great for RPC, that you’d need
to implement yourself the moment you need it.</p>
<p><strong>Transports</strong>: One of the main feature of Socket.IO is the
abstraction of the transport, that gives you real-time web support
down to Internet Explorer 6.0, using long-polling methods.  It will
also use native WebSockets when available to the browser, for even
lower latencies.  Currently supported transports: <tt class="docutils literal"><span class="pre">websocket</span></tt>,
<tt class="docutils literal"><span class="pre">flashsocket</span></tt>, <tt class="docutils literal"><span class="pre">htmlfile</span></tt>, <tt class="docutils literal"><span class="pre">xhr-multipart</span></tt>, <tt class="docutils literal"><span class="pre">xhr-polling</span></tt>,
<tt class="docutils literal"><span class="pre">jsonp-polling</span></tt>.</p>
<p>This implementation covers nearly all the features of the Socket.IO
0.7+ (up to at least 0.9.1) protocol, with events, callbacks.  It adds
security in a pythonic way with granular ACLs (which don’t exist in
the Node.js version) at the method level.  The project has several
examples in the source code and in the documentation.  Any addition
and fixes to the docs are warmly welcomed.</p>
</div>
<div class="section" id="concepts">
<h2>Concepts<a class="headerlink" href="https://gevent-socketio.readthedocs.org/en/latest/#concepts" title="Permalink to this headline">¶</a></h2>
<p>In order to understand the following documentation articles, let’s
clarify some of the terms used:</p>
<p>A <strong>Namespace</strong> is like a controller in the MVC world.  It encompasses
a set of methods that are logically in it.  For example, the
<tt class="docutils literal"><span class="pre">send_private_message</span></tt> event would be in the <tt class="docutils literal"><span class="pre">/chat</span></tt> namespace, as
well as the <tt class="docutils literal"><span class="pre">kick_ban</span></tt> event.  Whereas the <tt class="docutils literal"><span class="pre">scan_files</span></tt> event
would be in the <tt class="docutils literal"><span class="pre">/filesystem</span></tt> namespace.  Each namespace is
represented by a sub-class of <tt class="xref py py-class docutils literal"><span class="pre">BaseNamespace</span></tt>.  A simple
example would be, on the client side (the browser):</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="kd">var</span> <span class="nx">socket</span> <span class="o">=</span> <span class="nx">io</span><span class="p">.</span><span class="nx">connect</span><span class="p">(</span><span class="s2">"/chat"</span><span class="p">);</span>
</pre></div>
</div>
<p>having loaded the <tt class="docutils literal"><span class="pre">socket.io.js</span></tt> library somewhere in your &lt;head&gt;.
On the server (this is a Pyramid example, but its pretty much the same
for other frameworks):</p>
<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">socketio.namespace</span> <span class="kn">import</span> <span class="n">BaseNamespace</span>

<span class="k">class</span> <span class="nc">ChatNamespace</span><span class="p">(</span><span class="n">BaseNamespace</span><span class="p">):</span>
    <span class="k">def</span> <span class="nf">on_chat</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">msg</span><span class="p">):</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">emit</span><span class="p">(</span><span class="s">'chat'</span><span class="p">,</span> <span class="n">msg</span><span class="p">)</span>

<span class="k">def</span> <span class="nf">socketio_service</span><span class="p">(</span><span class="n">request</span><span class="p">):</span>
    <span class="n">socketio_manage</span><span class="p">(</span><span class="n">request</span><span class="o">.</span><span class="n">environ</span><span class="p">,</span> <span class="p">{</span><span class="s">'/chat'</span><span class="p">:</span> <span class="n">ChatNamespace</span><span class="p">},</span>
                    <span class="n">request</span><span class="p">)</span>
    <span class="k">return</span> <span class="s">"out"</span>
</pre></div>
</div>
<p>Here we use <a class="reference internal" href="https://gevent-socketio.readthedocs.org/en/latest/main.html#socketio.socketio_manage" title="socketio.socketio_manage"><tt class="xref py py-func docutils literal"><span class="pre">socketio.socketio_manage()</span></tt></a> to start the Socket.IO
machine, and handle the real-time communication.</p>
<p>You will come across the notion of a <tt class="docutils literal"><span class="pre">Socket</span></tt>.  This is a virtual
socket, that abstracts the fact that some transports are long-polling
and others are stateful (like a Websocket), and exposes the same
functionality for all.  You can have many namespaces inside a Socket,
each delimited by their name like <tt class="docutils literal"><span class="pre">/chat</span></tt>, <tt class="docutils literal"><span class="pre">/filesystem</span></tt> or
<tt class="docutils literal"><span class="pre">/foobar</span></tt>.  Note also that there is a global namespace, identified
by an empty string.  Some times, the global namespace has special
features, for backwards compatibilty reasons (we only have a global
namespace in version 0.6 of the protocol).  For example, disconnecting
the global namespace means disconnect the full socket.  Disconnecting
a qualified namespace, on the other hand, only removes access to that
namespace.</p>
<p>The <tt class="docutils literal"><span class="pre">Socket</span></tt> is responsible from taking the <cite>packets</cite>, which are, in
the realm of a <tt class="docutils literal"><span class="pre">Namespace</span></tt> or a <tt class="docutils literal"><span class="pre">Socket</span></tt> object, a dictionary that
looks like:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="p">{</span><span class="s">"type"</span><span class="p">:</span> <span class="s">"event"</span><span class="p">,</span>
 <span class="s">"name"</span><span class="p">:</span> <span class="s">"launch_superhero"</span><span class="p">,</span>
 <span class="s">"args"</span><span class="p">:</span> <span class="p">[</span><span class="s">"Superman"</span><span class="p">,</span> <span class="mi">123</span><span class="p">,</span> <span class="s">"km"</span><span class="p">,</span> <span class="p">{</span><span class="s">"hair_color"</span><span class="p">:</span> <span class="s">"brown"</span><span class="p">}]}</span>
</pre></div>
</div>
<p>These packets are serialized in a compact form when its time to put
them on the wire.  Socket.IO also has some optimizations if we need to
send many packets on some long-polling transports.</p>
<p>At this point, if you don’t know <tt class="docutils literal"><span class="pre">gevent</span></tt>, you probably will want to
learn a bit more about it, since it is the base you will be working
on:</p>
<blockquote>
<div><a class="reference external" href="http://www.gevent.org/">http://www.gevent.org/</a></div></blockquote>
</div>
<div class="section" id="getting-started">
<h2>Getting started<a class="headerlink" href="https://gevent-socketio.readthedocs.org/en/latest/#getting-started" title="Permalink to this headline">¶</a></h2>
<p>Until we have a fully-fledged tutorial, please check out our example
applications and the API documentation.</p>
<p>You can see a video that shows <tt class="docutils literal"><span class="pre">gevent-socketio</span></tt> in a live coding
presentation here:</p>
<blockquote>
<div><a class="reference external" href="http://pyvideo.org/video/1573/gevent-socketio-cross-framework-real-time-web-li">http://pyvideo.org/video/1573/gevent-socketio-cross-framework-real-time-web-li</a></div></blockquote>
<p>To learn how to build your Namespace (the object dealing with requests and replies), see:</p>
<blockquote>
<div><a class="reference internal" href="https://gevent-socketio.readthedocs.org/en/latest/namespace.html#namespace-module"><em>socketio.namespace</em></a></div></blockquote>
<p>See this doc for different servers integration:</p>
<blockquote>
<div><a class="reference internal" href="https://gevent-socketio.readthedocs.org/en/latest/server_integration.html#server-integration"><em>Server integration layers</em></a></div></blockquote>
</div>
<div class="section" id="examples">
<h2>Examples<a class="headerlink" href="https://gevent-socketio.readthedocs.org/en/latest/#examples" title="Permalink to this headline">¶</a></h2>
<p>The <tt class="docutils literal"><span class="pre">gevent-socketio</span></tt> repository holds several examples:</p>
<blockquote>
<div><p><a class="reference external" href="https://github.com/abourget/gevent-socketio/tree/master/examples">https://github.com/abourget/gevent-socketio/tree/master/examples</a></p>
<ul class="simple">
<li><tt class="docutils literal"><span class="pre">simple_chat</span></tt> is a bare-bone WSGI app with a minimal socketio integration</li>
<li><tt class="docutils literal"><span class="pre">simple_pyramid_chat</span></tt> is a simple chat application built on Pyramid</li>
<li><tt class="docutils literal"><span class="pre">live_cpu_graph</span></tt> is a simple realtime CPU graph (linux only)</li>
<li><tt class="docutils literal"><span class="pre">twitter_stream</span></tt> is a streaming feed of twitter updates</li>
<li><tt class="docutils literal"><span class="pre">pyramid_backbone_redis_chat</span></tt> is a Pyramid app using backbone.js and redis for pubsub</li>
<li><tt class="docutils literal"><span class="pre">pyramid_backbone_redis_chat_persistence</span></tt> is a Pyramid app using backbone.js, redis for pubsub and features persistence</li>
<li><tt class="docutils literal"><span class="pre">testapp</span></tt> is the app we use to test the different features, so there are a couple of more advanced use-cases demonstrated there</li>
</ul>
</div></blockquote>
<p><tt class="docutils literal"><span class="pre">pyvore</span></tt> is an application that was developed to serve as real-time
chat in conferences like the PyCon:</p>
<blockquote>
<div><a class="reference external" href="https://github.com/sontek/pyvore">https://github.com/sontek/pyvore</a></div></blockquote>
<p>This app is a Django tic-tac-toe application that uses the latest
<tt class="docutils literal"><span class="pre">gevent-socketio</span></tt>:</p>
<blockquote>
<div><a class="reference external" href="https://github.com/sontek/django-tictactoe">https://github.com/sontek/django-tictactoe</a></div></blockquote>
</div>
<div class="section" id="security">
<h2>Security<a class="headerlink" href="https://gevent-socketio.readthedocs.org/en/latest/#security" title="Permalink to this headline">¶</a></h2>
<p><tt class="docutils literal"><span class="pre">gevent-socketio</span></tt> provides method-level security, using an ACL
model.  You can read more about it in the <a class="reference internal" href="https://gevent-socketio.readthedocs.org/en/latest/namespace.html#namespace-module"><em>socketio.namespace</em></a>, but
a basic example to secure one namespace would look like:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="k">class</span> <span class="nc">AdminInterface</span><span class="p">(</span><span class="n">BaseNamespace</span><span class="p">):</span>
    <span class="k">def</span> <span class="nf">get_initial_acl</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="sd">"""Everything is locked at first"""</span>
        <span class="k">return</span> <span class="p">[]</span>

    <span class="k">def</span> <span class="nf">initialize</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="c"># This here assumes you have passed in a `request`</span>
        <span class="c"># to your socketio_manage() call, it has that</span>
        <span class="c"># `is_admin` attribute</span>
        <span class="k">if</span> <span class="ow">not</span> <span class="n">request</span><span class="o">.</span><span class="n">is_admin</span><span class="p">:</span>
            <span class="k">return</span>
        <span class="k">else</span><span class="p">:</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">lift_acl_restrictions</span><span class="p">()</span>

    <span class="k">def</span> <span class="nf">on_blahblahblah</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">data</span><span class="p">):</span>
        <span class="sd">"""This can't be access until `lift_acl_restrictions()` has</span>
<span class="sd">        been called</span>

<span class="sd">        """</span>
        <span class="k">pass</span>
</pre></div>
</div>
</div>
<div class="section" id="api-docs">
<h2>API docs<a class="headerlink" href="https://gevent-socketio.readthedocs.org/en/latest/#api-docs" title="Permalink to this headline">¶</a></h2>
<p>API documentation is where most of the juice/meat is.  Read through
and you’ll (hopefully) understand everything you need about
<tt class="docutils literal"><span class="pre">gevent-socketio</span></tt>.</p>
<p>The manager is the function you call from your framework.  It is in:</p>
<blockquote>
<div><a class="reference internal" href="https://gevent-socketio.readthedocs.org/en/latest/main.html#module-socketio" title="socketio"><tt class="xref py py-mod docutils literal"><span class="pre">socketio</span></tt></a></div></blockquote>
<p><strong>Namespaces</strong> are the main interface the developer is going to use.
You mostly define your own BaseNamespace derivatives, and
gevent-socketio maps the incoming messages to your methods
automatically:</p>
<blockquote>
<div><a class="reference internal" href="https://gevent-socketio.readthedocs.org/en/latest/namespace.html#module-socketio.namespace" title="socketio.namespace"><tt class="xref py py-mod docutils literal"><span class="pre">socketio.namespace</span></tt></a></div></blockquote>
<p><strong>Mixins</strong> are components you can add to your namespaces, to provided
added functionality.</p>
<blockquote>
<div><a class="reference internal" href="https://gevent-socketio.readthedocs.org/en/latest/mixins.html#module-socketio.mixins" title="socketio.mixins"><tt class="xref py py-mod docutils literal"><span class="pre">socketio.mixins</span></tt></a></div></blockquote>
<p><strong>Sockets</strong> are the virtual tunnels that are established and
abstracted by the different Transports.  They basically expose
socket-like send/receive functionality to the Namespace objects.  Even
when we use long-polling transports, only one Socket is created per
browser.</p>
<blockquote>
<div><a class="reference internal" href="https://gevent-socketio.readthedocs.org/en/latest/virtsocket.html#module-socketio.virtsocket" title="socketio.virtsocket"><tt class="xref py py-mod docutils literal"><span class="pre">socketio.virtsocket</span></tt></a></div></blockquote>
<p><strong>Packet</strong> is a library that handle the decoding of the messages
encoded in the Socket.IO dialect.  They take dictionaries for
encoding, and return decoded dictionaries also.</p>
<blockquote>
<div><a class="reference internal" href="https://gevent-socketio.readthedocs.org/en/latest/packet.html#module-socketio.packet" title="socketio.packet"><tt class="xref py py-mod docutils literal"><span class="pre">socketio.packet</span></tt></a></div></blockquote>
<p><strong>Handler</strong> is a lower-level transports handler.  It is responsible
for calling your WSGI application</p>
<blockquote>
<div><a class="reference internal" href="https://gevent-socketio.readthedocs.org/en/latest/handler.html#module-socketio.handler" title="socketio.handler"><tt class="xref py py-mod docutils literal"><span class="pre">socketio.handler</span></tt></a></div></blockquote>
<p><strong>Transports</strong> are responsible for translating the different fallback
mechanisms to one abstracted Socket, dealing with payload encoding,
multi-message multiplexing and their reverse operation.</p>
<blockquote>
<div><a class="reference internal" href="https://gevent-socketio.readthedocs.org/en/latest/transports.html#module-socketio.transports" title="socketio.transports"><tt class="xref py py-mod docutils literal"><span class="pre">socketio.transports</span></tt></a></div></blockquote>
<p><strong>Server</strong> is the component used to hook Gevent and its WSGI server to
the WSGI app to be served, while dispatching any Socket.IO related
activities to the <cite>handler</cite> and the <cite>transports</cite>.</p>
<blockquote>
<div><a class="reference internal" href="https://gevent-socketio.readthedocs.org/en/latest/server.html#module-socketio.server" title="socketio.server"><tt class="xref py py-mod docutils literal"><span class="pre">socketio.server</span></tt></a></div></blockquote>
<p>Auto-generated indexes:</p>
<ul class="simple">
<li><a class="reference internal" href="https://gevent-socketio.readthedocs.org/en/latest/genindex.html"><em>Index</em></a></li>
<li><a class="reference internal" href="https://gevent-socketio.readthedocs.org/en/latest/py-modindex.html"><em>Module Index</em></a></li>
</ul>
</div>
<div class="section" id="references">
<h2>References<a class="headerlink" href="https://gevent-socketio.readthedocs.org/en/latest/#references" title="Permalink to this headline">¶</a></h2>
<p>LearnBoost’s node.js version is the reference implementation, you can
find the server component at this address:</p>
<blockquote>
<div><a class="reference external" href="https://github.com/learnboost/socket.io">https://github.com/learnboost/socket.io</a></div></blockquote>
<p>The client JavaScript library’s development branch is here:</p>
<blockquote>
<div><a class="reference external" href="https://github.com/LearnBoost/socket.io-client">https://github.com/LearnBoost/socket.io-client</a></div></blockquote>
<p>The specifications to the protocol are somehow in this repository:</p>
<blockquote>
<div><a class="reference external" href="https://github.com/LearnBoost/socket.io-spec">https://github.com/LearnBoost/socket.io-spec</a></div></blockquote>
<p>This is the original wow-website:</p>
<blockquote>
<div><a class="reference external" href="http://socket.io/">http://socket.io</a></div></blockquote>
<p>Here is a list of the different frameworks integration to date,
although not all have upgraded to the latest version of
gevent-socketio:</p>
<blockquote>
<div><ul class="simple">
<li>pyramid_socketio: <a class="reference external" href="https://github.com/abourget/pyramid_socketio">https://github.com/abourget/pyramid_socketio</a></li>
<li>django-socketio: <a class="reference external" href="https://github.com/stephenmcd/django-socketio">https://github.com/stephenmcd/django-socketio</a></li>
</ul>
</div></blockquote>
<p>The Flask guys will be working on an integration layer soon.</p>
</div>
<div class="section" id="contacts">
<h2>Contacts<a class="headerlink" href="https://gevent-socketio.readthedocs.org/en/latest/#contacts" title="Permalink to this headline">¶</a></h2>
<p>For any questions, you can use the Issue tracking at Github:</p>
<blockquote>
<div><a class="reference external" href="https://github.com/abourget/gevent-socketio">https://github.com/abourget/gevent-socketio</a>
<a class="reference external" href="https://github.com/abourget/gevent-socketio/issues">https://github.com/abourget/gevent-socketio/issues</a></div></blockquote>
<p>The mailing list:</p>
<blockquote>
<div><a class="reference external" href="https://groups.google.com/forum/#!forum/gevent-socketio">https://groups.google.com/forum/#!forum/gevent-socketio</a></div></blockquote>
<p>The maintainers:</p>
<blockquote>
<div><a class="reference external" href="https://twitter.com/bourgetalexndre">https://twitter.com/bourgetalexndre</a>
<a class="reference external" href="https://twitter.com/sontek">https://twitter.com/sontek</a></div></blockquote>
</div>
<div class="section" id="credits">
<h2>Credits<a class="headerlink" href="https://gevent-socketio.readthedocs.org/en/latest/#credits" title="Permalink to this headline">¶</a></h2>
<p><strong>Jeffrey Gellens</strong> for starting and polishing this project over the years.</p>
<p>PyCon 2012 and the Sprints, for bringing this project up to version
0.9 of the protocol.</p>
<p>Current maintainers:</p>
<blockquote>
<div><ul class="simple">
<li>Alexandre Bourget</li>
<li>John Anderson</li>
</ul>
</div></blockquote>
<p>Contributors:</p>
<blockquote>
<div><ul class="simple">
<li>Denis Bilenko</li>
<li>Bobby Powers</li>
<li>Lon Ingram</li>
<li>Eugene Baumstein</li>
<li>Sébastien Béal</li>
<li>jpellerin (JP)</li>
<li>Philip Neustrom</li>
<li>Jonas Obrist</li>
<li>fabiodive</li>
<li>Dan O’Neill</li>
<li>Whit Morriss</li>
<li>Chakib (spike) Benziane</li>
<li>Vivek Venugopalan</li>
<li>Vladimir Protasov</li>
<li>Bruno Bigras</li>
<li>Gabriel de Labacheliere</li>
<li>Flavio Curella</li>
<li>thapar</li>
<li>Marconi Moreto</li>
<li>sv1jsb</li>
<li>Cliff Xuan</li>
<li>Matt Billenstein</li>
<li>Rolo</li>
<li>Anthony Oliver</li>
<li>Pierre Giraud</li>
<li>m0sth8</li>
<li>Daniel Swarbrick</li>
</ul>
</div></blockquote>
</div>
<div class="section" id="todo">
<h2>TODO<a class="headerlink" href="https://gevent-socketio.readthedocs.org/en/latest/#todo" title="Permalink to this headline">¶</a></h2>
<p>How to integrate your framework’s “session” object (Beaker, memcached, or file-based).  Beware: this can be tricky. You need to manage that yourself.</p>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">


    
            <h3>Project Versions</h3>
            <ul id="sidebar_versions"><li><a href="./Gevent-socketio documentation — gevent-socketio 0.3.1 documentation_files/Gevent-socketio documentation — gevent-socketio 0.3.1 documentation.html">latest</a></li></ul>
    
    <div id="searchbox" style="display: block;">
      <h3>RTD Search</h3>
        <form class="search" action="https://readthedocs.org/search/project/" method="get">
          <input type="text" name="q" size="18">
          <input type="submit" value="Go">
          <input type="hidden" name="selected_facets" value="project_exact:gevent-socketio">
        </form>
        <p class="searchtip" style="font-size: 90%">
            Full-text doc search.
        </p>
    </div>


  <h3><a href="https://gevent-socketio.readthedocs.org/en/latest/#">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="https://gevent-socketio.readthedocs.org/en/latest/#">Gevent-socketio documentation</a><ul>
<li><a class="reference internal" href="https://gevent-socketio.readthedocs.org/en/latest/#introduction">Introduction</a></li>
<li><a class="reference internal" href="https://gevent-socketio.readthedocs.org/en/latest/#concepts">Concepts</a></li>
<li><a class="reference internal" href="https://gevent-socketio.readthedocs.org/en/latest/#getting-started">Getting started</a></li>
<li><a class="reference internal" href="https://gevent-socketio.readthedocs.org/en/latest/#examples">Examples</a></li>
<li><a class="reference internal" href="https://gevent-socketio.readthedocs.org/en/latest/#security">Security</a></li>
<li><a class="reference internal" href="https://gevent-socketio.readthedocs.org/en/latest/#api-docs">API docs</a></li>
<li><a class="reference internal" href="https://gevent-socketio.readthedocs.org/en/latest/#references">References</a></li>
<li><a class="reference internal" href="https://gevent-socketio.readthedocs.org/en/latest/#contacts">Contacts</a></li>
<li><a class="reference internal" href="https://gevent-socketio.readthedocs.org/en/latest/#credits">Credits</a></li>
<li><a class="reference internal" href="https://gevent-socketio.readthedocs.org/en/latest/#todo">TODO</a></li>
</ul>
</li>
</ul>

  
    <h3>This Page</h3>
    <ul class="this-page-menu">
      
        <li><a href="https://gevent-socketio.readthedocs.org/en/latest/_sources/index.txt" rel="nofollow">Show Source</a></li>
      
      
        <li><a href="https://github.com/abourget/gevent-socketio/blob/master/docs/source/index.rst">
          Show on GitHub</a></li>
        <li><a href="https://github.com/abourget/gevent-socketio/edit/master/docs/source/index.rst">
          Edit on GitHub</a></li>
      
    </ul>
  

<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="https://gevent-socketio.readthedocs.org/en/latest/search.html" method="get">
      <input type="text" name="q">
      <input type="submit" value="Go">
      <input type="hidden" name="check_keywords" value="yes">
      <input type="hidden" name="area" value="default">
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="https://gevent-socketio.readthedocs.org/en/latest/genindex.html" title="General Index">index</a></li>
        <li class="right">
          <a href="https://gevent-socketio.readthedocs.org/en/latest/py-modindex.html" title="Python Module Index">modules</a> |</li>
        <li><a href="https://gevent-socketio.readthedocs.org/en/latest/#">gevent-socketio 0.3.1 documentation</a> »</li> 
      </ul>
    </div>

    <div class="footer">
        © Copyright 2011-2013, Jeffrey Gelens, Alexandre Bourget, and John Anderson.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3+.
    </div>
 <!-- End original user content -->



<style type="text/css">
  .rtd-badge {
    position: fixed;
    display: block;
    bottom: 5px;
    height: 40px;
    text-indent: -9999em;
    border-radius: 3px;
    -moz-border-radius: 3px;
    -webkit-border-radius: 3px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 1px 0 rgba(255, 255, 255, 0.2) inset;
    -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 1px 0 rgba(255, 255, 255, 0.2) inset;
    -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 1px 0 rgba(255, 255, 255, 0.2) inset;
  }
  #version_menu {
    position: fixed;
    display: none;
    bottom: 11px;
    right: 166px;
    list-style-type: none;
    margin: 0;
  }
  .footer_popout:hover #version_menu {
    display: block;
  }
  #version_menu li {
    display: block;
    float: right;
  }
  #version_menu li a {
    display: block;
    padding: 6px 10px 4px 10px;
    margin: 7px 7px 0 0;
    font-weight: bold;
    font-size: 14px;
    height: 20px;
    line-height: 17px;
    text-decoration: none;
    color: #fff;
    background: #8ca1af url(../images/gradient-light.png) bottom left repeat-x;
    border-radius: 3px;
    -moz-border-radius: 3px;
    -webkit-border-radius: 3px;
    box-shadow: 0 1px 1px #465158;
    -moz-box-shadow: 0 1px 1px #465158;
    -webkit-box-shadow: 0 1px 1px #465158;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
  }
  #version_menu li a:hover {
    text-decoration: none;
    background-color: #697983;
    box-shadow: 0 1px 0px #465158;
    -moz-box-shadow: 0 1px 0px #465158;
    -webkit-box-shadow: 0 1px 0px #465158;
  }
  .rtd-badge.rtd {
    background: #3b4449 url(//media.readthedocs.org//images/badge-rtd.png) scroll 0px -46px no-repeat;
    border: 1px solid #282E32;
    width: 41px;
    right: 5px;
  }
  .footer_popout:hover .rtd-badge.rtd {
    background-position: top left;
    width: 160px;
  }
  .rtd-badge.revsys { background: #465158 url(//media.readthedocs.org//images/badge-revsys.png) top left no-repeat;
    border: 1px solid #1C5871;
    width: 290px;
    right: 173px;
  }
  .rtd-badge.revsys-inline-sponsored {
    position: inherit;
    margin-left: auto;
    margin-right: 175px;
    margin-bottom: 5px;
    background: #465158 url(//media.readthedocs.org//images/badge-revsys.png) top left no-repeat;
    border: 1px solid #1C5871;
    width: 290px;
    right: 173px;
  }
  .rtd-badge.revsys-inline {
    position: inherit;
    margin-left: auto;
    margin-right: 175px;
    margin-bottom: 5px;
    background: #465158 url(//media.readthedocs.org//images/badge-revsys-sm.png) top left no-repeat;
    border: 1px solid #1C5871;
    width: 205px;
    right: 173px;
  }

.rtd_doc_footer { background-color: #465158;}

</style>
<div class="rtd_doc_footer">
  <div class="footer_popout">
    <a href="https://readthedocs.org/projects/gevent-socketio/?fromdocs=gevent-socketio" class="rtd-badge rtd"> Brought to you by Read the Docs</a>
    <ul id="version_menu"><li><a href="./Gevent-socketio documentation — gevent-socketio 0.3.1 documentation_files/Gevent-socketio documentation — gevent-socketio 0.3.1 documentation.html">latest</a></li></ul>
  </div>
</div>
<!-- RTD Analytics Code -->
<script type="text/javascript">
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-17997319-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
</script>




  
</body></html>